<?php if (! defined('BASEPATH')) exit ('No direct script access allowed');

class Index extends MY_Controller{
	
	public function __construct(){
		parent::__construct();
		$this->load->model('articles_model');
		$this->load->model('articlescategory_model');
		$this->db = $this->load->database("default", TRUE);
	}
	
	public function index(){
		$result['gzdt'] = $this->articles_model->select('*','category=2','update_time desc',6);
		$result['lzzc'] = $this->articles_model->select('*','category=3','update_time desc',5);
		$result['zcfg'] = $this->articles_model->select('*','category=13','update_time desc',6);
		$result['xnwj'] = $this->articles_model->select('*','category=14','update_time desc',6);
		$result['lzwh'] = $this->articles_model->select('*','category=15','update_time desc',5);
		$result['aljy'] = $this->articles_model->select('*','category=16','update_time desc',5);
		$result['bannerImg'] = $this->articles_model->select('id,articles_title,articles_img','articles_img != ""','update_time desc',4);
//		echo '<pre>';
//		print_r($result['bannerImg']);
//		exit;
		$result['tzgg'] = $this->articles_model->select('*','category=18','update_time desc',5);
		$this->load->view('home',$result);
	}
}
?>